<? include block('htmla') ?>

<fieldset><legend> <?=dat('page','name')?> </legend><div>

<? if (sizeof($d = dat('objects'))) { 

	?><table><thead><tr><td><?=t('Edit', 'tpl')?></td><td><?=t('Menu name', 'tpl')?></td></tr></thead><tbody><?

	foreach($d as $a) {
		?><tr>
			<td>
				<a title="<?=ht('Edit “!name”', 'tpl', array('!name' => $a['name']))?>" class="button edit" href="edit-<?=$a['id']?>/"></a>
				<a title="<?=ht('Kill “!name”', 'tpl', array('!name' => $a['name']))?>" class="button kill" href="delete-<?=$a['id']?>/" onclick="return confirm('<?=ht('Are you sure you want to kill “!name”?', 'tpl', array('!name' => $a['name']))?>')"></a>			
			</td>
			<td><a href="edit-<?=$a[id]?>/" title="<?=ht('Edit “!name”', 'tpl', array('!name' => $a['name']))?>"><?=$a['name']?></a></td>
		  </tr>
		<?
	}

	?></tbody></table><?

} else {

	?><?=t('No menus', 'tpl')?><?

} ?>

<h3><?=t('Create menu', 'tpl')?></h3>
<form action="" method="post">
	<label><?=t('Menu label', 'tpl')?>
		<input type="text" name="title" /></label>
	<input type="submit" name="create_object" value="<?=t('Create', 'tpl')?>" />
</form>

</div></fieldset>


</div>

</body>
</html>
